//
//  Fraction.h
//  OC03_属性_点语法
//
//  Created by 侯平章 on 16/2/21.
//  Copyright © 2016年 侯平章. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
/** 属性*/
@property (nonatomic,assign) NSInteger denominator;
@property (nonatomic,assign) NSInteger numerator;

- (instancetype)initWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;
+ (instancetype)fractionWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;
/** 加减乘除*/
- (Fraction *)plusWithFraction:(Fraction *)frac;
- (Fraction *)subWithFraction:(Fraction*)frac;
- (Fraction *)multWithFraction:(Fraction*)frac;
- (Fraction *)divWithFraction:(Fraction*)frac;
// 比较大小
- (Fraction *)comWithFraction:(Fraction*)frac;
//约分
- (Fraction *)reductionWithFraction:(Fraction*)frac;


@end
